<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Tin tức</title>
<script src="editor/richtext_full.js"></script>
<script src="js/utils/common.js"></script>
<script src="js/news.js"></script>
<script src="js/newsgroup.js"></script>
<script src="js/homepic.js"></script>
<script src="js/checklogin.js"></script>
<script src="js/listnews.js"></script>

<script src="js/utils/XHR.js"></script>
<script src="js/utils/PageBreakAdmin.js"></script>
<link href="css.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/javascript">
initRTE("editor/images/", "editor/", "");
</script>
<script type="text/javascript">
if (document.location.protocol == 'file:') {
	alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
}
</script>
<script type="text/javascript" src="js/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
	tinyMCE.init({
		// General options
		mode : "exact",
        elements : "elm1",
		theme : "advanced",
		plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave,visualblocks",

		// Theme options
		theme_advanced_buttons1 : "fontselect,fontsizeselect",
		theme_advanced_buttons2 : "bold,italic,underline,strikethrough,visualchars,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,code,|,image,media",
		theme_advanced_buttons3 : "tablecontrols",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true,
		
		theme_advanced_font_sizes : "10px,12px,13px,14px,16px,24px",
		// Example content CSS (should be your site CSS)
		content_css : "css/content.css",

		// Drop lists for link/image/media/template dialogs
		template_external_list_url : "lists/template_list.js",
		external_link_list_url : "lists/link_list.js",
		external_image_list_url : "lists/image_list.js",
		media_external_list_url : "lists/media_list.js",

		// Style formats
		style_formats : [
			{title : 'Bold text', inline : 'b'},
			{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
			{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
			{title : 'Example 1', inline : 'span', classes : 'example1'},
			{title : 'Example 2', inline : 'span', classes : 'example2'},
			{title : 'Table styles'},
			{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
		],

		// Replace values for the template plugin
		template_replace_values : {
			username : "Some User",
			staffid : "991234"
		}
	});
</script>
</head>

<body>
<div style="background-color:#464646">
<div style="background-image:url(images/banner.jpg);background-position:center;background-repeat:no-repeat;height:120px" align="center">
<div style="padding:3px;text-align:right;padding-right:20px;"><span id="username"></span> | <a href="DoLogout" style="color:#FFF">[Thoát]</a></div>
</div>
<div style="background-image:url(images/menu.jpg);" align="center">
  <table width="1000" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td style="font-weight:bold;padding-top:10px" id="menu">
        </td>
    </tr>
  </table>
</div>
</div>
<div style="background-color:#dfdfdf;height:5px"></div>
<div align="center" style="padding-top:10px"><span style="padding:3px;visibility:hidden;font-size:12px;font-weight:bold;color:#F00" id="loading"><img src="images/waiting.gif" width="16" height="16" /> Vui lòng chờ</span></div>
<table width="1000" border="0" align="center" cellpadding="3" cellspacing="0" style="margin-top:5px">
  <tr>
    <td width="260" align="left" valign="top">
    <div style="padding:5px"><span style="cursor:pointer;text-decoration:underline" onclick="chooseTab(0)" id="text_auto">Tin tức tự động</span>&nbsp;&nbsp;|&nbsp;&nbsp;<span style="cursor:pointer" onclick="chooseTab(1)" id="text_hand">Tin hệ thống</span>&nbsp;&nbsp;|&nbsp;&nbsp;<span style="cursor:pointer" onclick="chooseTab(2)" id="text_user">User share</span></div>
    <table width="252" border="0" cellspacing="0" cellpadding="3" style="border:1px solid #DDDDDD;margin-bottom:10px" id="autonewsdiv">
      <tr>
        <td align="center" bgcolor="#CCCCCC">
        
        <div style="padding:5px;font-weight:bold">TIN TỨC TỰ ĐỘNG  </div>
          <span id="catlist"></span>
         
          </td>
      </tr>
      <tr>
        <td  valign="top" width="244"><div id="auto_newslist" style="overflow:auto;height:450px"></div>
          <div align="center" style="padding:3px">
            <input type="checkbox" name="scheck" id="scheck" onClick="checkAll()"/>
            <input type="button" name="button" id="update_btn" value="Chuyển vào tin hệ thống" onclick="add()"  />
            <input type="button" name="getart" id="getart" value="Lấy tin từ Art" onclick="getFromArt()"  /> 
            <div id="artStatus"></div>           
          </div>
         </td>
      </tr>
    </table>
     <div style="padding:5px" align="center"><a href="http://tn.rolo.vn/TopNewsManager/DoAdmin?action=resetDatePublished" target="_blank" style="color:#333">Fix "Lỗi rồi"</a></div>
    <table width="251" border="0" cellspacing="0" cellpadding="3" style="border:1px solid #DDDDDD;display:none" id="handmadediv">
          <tr>
            <td colspan="2" align="center" bgcolor="#CCCCCC"><div style="padding:5px;font-weight:bold">
              <input type="button" name="button10" id="button" value="Refresh" onclick="changeTypeNews()" />
            </div>
            <div id="catlist2"></div>
            <div>
              <select name="statusnews" onchange="changeTypeNews()" style="width:100px">
              <option value="1">Đã đăng</option>
              <option value="0">Chưa đăng</option>
            </select></div>
            
            </td>
        </tr>
		  <tr>
            <td width="80" style="color:#990000;font-weight:bold "><span id="totalSP"></span></td>
          <td width="157" align="right" id="pagebreak1">&nbsp;</td>
		  </tr>
          <tr>
            <td colspan="2" valign="top">
            <div style="height:500px;overflow:auto"  id="listnews"></div>
            </td>
          </tr>
          <tr>
            <td colspan="2" align="right" id="pagebreak2">&nbsp;</td>
          </tr>
      </table>
      
       <table width="252" border="0" cellspacing="0" cellpadding="3" style="border:1px solid #DDDDDD;margin-bottom:10px;display:none" id="usernewsdiv">
      <tr>
        <td align="center" bgcolor="#CCCCCC">
        
        <div style="padding:5px;font-weight:bold">TIN TỨC TỰ ĐỘNG  </div>
          <span id="catlist"></span>
         <input type="button" name="Button" value="List" onClick="btnListShare()" />
          </td>
      </tr>
      <tr>
        <td  valign="top" width="244"><div id="user_newslist" style="overflow:auto;height:450px"></div>
         
         </td>
      </tr>
    </table>
      
    </td>
    <td width="728" align="left" valign="top">
    <iframe name="iframenull" style="display:none"></iframe>
    <div style="padding-bottom:5px;font-weight:bold">Xem theo link: 
      <input name="linkview" type="text" id="linkview" style="width:400px" />
              <input type="button" name="button8" id="button7" value="View" onclick="viewLink()" />
    </div>
    <form action="InsertUpdateNews" method="post" enctype="multipart/form-data" target="iframenull" name="myform">
    <table width="719" border="0" cellspacing="0" cellpadding="3">
      <tr>
        <td width="86" bgcolor="#E6E6E6">Tiêu đề:</td>
        <td width="352" bgcolor="#E6E6E6"><input type="text" name="title" id="title" style="width:350px"/></td>
        <td width="69" bgcolor="#E6E6E6">Ngày đăng</td>
        <td width="188" bgcolor="#E6E6E6"><input type="text" name="date" id="date" style="width:140px" />
        <div style="font-size:11px">Vd: 20/12/2011  20:30</div>
        </td>
      </tr>
      <tr>
        <td>Tóm tắt:</td>
        <td colspan="3"><textarea name="t_summary" id="t_summary" cols="45" rows="5" style="width:500px;font-family:arial;font-size:12px;height:70px"></textarea></td>
      </tr>
      <tr>
        <td bgcolor="#E6E6E6">Chi tiết:</td>
        <td colspan="3" bgcolor="#E6E6E6">
        	<form id="rte" name="rte" action="post">
				<div>
					<!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
					<div>
						<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 100%">
							
						</textarea>
					</div>
					<br />
					<input type="button" onclick="tinyMCE.execCommand('mceInsertContent',false,'<b>dfdfdf</b>');return false;" value="Chèn nội dung"/>
					<input type="button" onclick="javascript:tinyMCE.activeEditor.setContent('');" value="Xóa nội dung"/>					
				</div>
			</form>

        </td>
      </tr>
      <tr>
        <td>Hình ảnh<br />
          Thumbnail<br />
          <span style="color:#F00">(320px-150px)</span>
:</td>
        <td colspan="3"><div><table width="600" border="0" cellspacing="0" cellpadding="0">
            <tr>
    <td colspan="2"><div id="smallpic"></div></td>
    </tr>
  <tr>
    <td width="303"><input type="file" name="fileField" id="fileField" /></td>
    <td width="397"><input type="file" name="fileField2" id="fileField2" /></td>
  </tr>
  <tr>
    <td><input type="file" name="fileField3" id="fileField3" /></td>
    <td><input type="file" name="fileField4" id="fileField4" /></td>
  </tr>
  <tr>
    <td><input type="file" name="fileField5" id="fileField5" /></td>
    <td><input type="file" name="fileField6" id="fileField6" /></td>
  </tr>
            </table>
              <textarea name="img_link" id="img_link" style="width:600px;height:70px"></textarea>
            </div>
        </td>
      </tr>
       <tr bgcolor="#FF9966">
        <td>Hình lớn<br />
          203px - 205px
          </td>
        <td colspan="3"><div><table width="600" border="0" cellspacing="0" cellpadding="0">
            <tr>
    <td colspan="2"><div id="homepic"></div></td>
    </tr>
  <tr>
    <td colspan="2"><input type="file" name="homepic_1" id="homepic_1" />      <input type="file" name="homepic_2" id="homepic_2"  style="display:none" />
      <input type="file" name="homepic_3" id="homepic_3" style="display:none" />      <input type="file" name="homepic_4" id="homepic_4"  style="display:none" /></td>
  </tr>
  </table>
        </div>
        </td>
      </tr>
      <tr>
        <td bgcolor="#E6E6E6">Nguồn:</td>
        <td colspan="3" bgcolor="#E6E6E6"><input type="text" name="source" id="source" style="width:250px"/>
          <span>&nbsp;Poster: <span id="user_post" style="color:#F00;font-size:14px;font-weight:bold"></span></span></td>
        </tr>
        <tr>
        <td>Link:</td>
        <td colspan="3"><input type="text" name="link" id="link" style="width:400px" /> 
        <a href="" id="viewOrgPage" target="_blank" style="color:#333">[Xem trang gốc]</a>
        <a href="" id="viewPage" target="_blank" style="color:#333">[Xem nội dung]</a>
        </td>
        </tr>
        <tr>
        <td bgcolor="#E6E6E6">Keyword:</td>
        <td colspan="3" bgcolor="#E6E6E6"><textarea name="keyword" id="keyword" style="width:500px;height:50px;font-family:arial;font-size:12px"></textarea>
        <div style="color:#666;font-size:11px">Cách nhau dấu "," (tối đa 10 keyword)</div>
        </td>
        </tr>
      <tr>
        <td bgcolor="#FFFFFF">Chuyên mục</td>
        <td colspan="3" bgcolor="#FFFFFF"><table width="593" border="0" cellspacing="0" cellpadding="2">
            <tr>
              <td width="155" valign="top" style="font-size:11px">
              	<div><label><input name="cat" type="checkbox" value="1" id="cat1" /> Xã hội </label></div>
                <div><label><input name="cat" type="checkbox" value="6" id="cat6" /> Thế giới </label></div>
                <div><label><input name="cat" type="checkbox" value="2" id="cat2" /> Kinh tế </label></div>                
                
                </td>
              <td width="154" valign="top" style="font-size:11px">
               	<div><label><input name="cat" type="checkbox" value="7" id="cat7" /> Văn hóa - Nghệ thuật </label></div>
                <div><label><input name="cat" type="checkbox" value="5" id="cat5" /> Thể thao </label></div>
                <div><label><input name="cat" type="checkbox" value="4" id="cat4" /> Giáo dục </label></div>                
              </td>
              <td width="136" valign="top" style="font-size:11px">
                <div><label><input name="cat" type="checkbox" value="9" id="cat9" /> Đời sống </label></div>
                <div><label><input name="cat" type="checkbox" value="8" id="cat8" /> Sức khỏe </label></div>
                <div><label><input name="cat" type="checkbox" value="3" id="cat3" /> Khoa học - CN </label></div>                

              </td>
			   <td width="132" valign="top" style="font-size:11px">&nbsp;</td>
            </tr>
          </table></td>
      </tr>
      <tr>
        <td bgcolor="#E6E6E6">Tổng số tin</td>
        <td colspan="3" bgcolor="#E6E6E6">
        	<div style="padding-bottom:10px">ID Topnews:&nbsp;
              <input name="topnewslink" type="text" id="topnewslink" style="width:300px" />
<input type="button" name="button13" value="Cập nhật" onclick="changeToTopNews()" id="changebtn" />
        	</div>
        	<div id="totalnewsdiv" style="font-weight:bold;font-size:14px"></div>
            <div id="listLinkDiv"><table width="601" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="271">Tiêu đề</td>
    <td width="147">Link</td>
    <td width="98">Ngày</td>
    <td width="85">Nguồn</td>
  </tr>
  <tr>
    <td><input type="text" name="group_title" id="group_title" style="width:260px" /></td>
    <td><input type="text" name="group_link" id="group_link" style="width:140px" /></td>
    <td><input type="text" name="group_date" id="group_date" style="width:90px" /></td>
    <td><input type="text" name="group_source" id="group_source" style="width:80px" /></td>
  </tr>
  <tr>
    <td colspan="4" align="center">
    	<div style="padding:5px;">
        	<input type="button" name="button11" id="button3" value="Thêm" onclick="addNewsToGroup()" />
	      <input type="button" name="button12" id="button4" value="Cập nhật" onclick="updateNewsInGroup()"/>
         </div> 
     </td>
    </tr>
            </table>
            <div id="listLink"></div>
</div>
        </td>
      </tr>
      <tr>
        <td colspan="4" align="center" style="padding-top:10px">
          <input type="button" name="button2" value="Thêm mới" onclick="preSubmit('insert')" id="add_Btn"/>
          <input type="button" name="button3" value="Cập nhật"  onclick="preSubmit('edit')" id="editBtn"/>
          <br />
          <input type="button" name="button5" value="Xóa tin" onclick="deleteNews($NEWSID)" id="delBtn"/>
          <input type="button" name="button6" value="Đăng tin" onclick="updateStatus($NEWSID,1)"  id="publishBtn"/>
          <input type="button" name="button7" value="Không đăng" onclick="updateStatus($NEWSID,0)" id="noPublishBtn" disabled="disabled"/>
          <input type="button" name="button4" value="Xóa form" onclick="javascript:tinyMCE.activeEditor.setContent('');"/>
  <input type="hidden" name="content" id="content" />
          <input type="hidden" name="catidlist" id="catidlist" />
          <input type="hidden" name="action" id="action" />
          <input type="hidden" name="summary" id="summary" />
          <input type="hidden" name="linkpic" id="linkpic" />
          <label>
            <input type="hidden" name="newsid" id="newsid" />
            <input type="hidden" name="remainedfile" id="remainedfile" />
            <input type="hidden" name="oldhomepic" id="oldhomepic" />
            <br />
           <div style="color:#F00"> Sau khi cập nhật thông tin, đăng tin, xóa tin, vui lòng bấm vào nút "CẬP NHẬT CHUYÊN MỤC HOME"<br /> 
            bên dưới để thay đổi nội dung trang chủ.</div><br />
            <input type="button" name="button9" id="button2" value="CẬP NHẬT CHUYÊN MỤC HOME" onclick="new NEWS().clearAllCacheHome()"/>
          </label></td>
        </tr>
    </table>
    </form>
    </td>
  </tr>
</table>
<div class="commonfloatdiv" id="add_HomeDiv" style="width:260px;height:90px;z-index:100;display:none">
	<input name="cathome" type="radio" value="0" onclick="$CATHOME=0" />Trang Tổng hợp<br />
  	<input name="cathome" type="radio" value="3" onclick="$CATHOME=3"/>Nghệ thuật<br />
    <input name="cathome" type="radio" value="7" onclick="$CATHOME=7"/>Khoa học công nghệ<br />
    <div align="center"><input name="" value="OK" type="button" onclick="addHomeNews()" /><input name="" value="Cancel" type="button" onclick="$('add_HomeDiv').style.display='none'" /></div>
</div>
<div class="commonfloatdiv" id="changepass_div" style="width:260px;height:90px;z-index:100;display:none">
Mật khẩu cũ: &nbsp;&nbsp;
<input name="old_password" type="old_password" /><br />
Mật khẩu mới: <input name="password" type="password" /><br />
Nhập lại:&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input name="c_password" type="password" /><br />
<div align="center"><input name="" type="button" value="Cập nhật" onclick="updatePassword()"/><input name="" type="button" value="Đóng" onclick="$('changepass_div').style.display='none'"/></div>
</div>

</body>
</html>
